<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<c:set var="basePath" value="${pageContext.request.contextPath}" scope="page"></c:set>

<!DOCTYPE html>
<html>  
    <head>  
    <title>用户上传图片页面</title>  
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  
    </head>  
    <body>  
        <center>  
            <form action="${basePath}/UploadFileServlet"  
                method="post" enctype="multipart/form-data">  
                <input type="file" name="file" />   
                <input type="submit" value="上 传" />  
            </form>  
            <h5>上传结果：</h5>  
            <img alt="暂无图片" src="${fileUrl}" />  
        </center>  
    </body>  
    </html>  